package org.martin.snsrs.client;

import org.martin.snsrs.application.ActivityApplication;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.widget.Toast;

public class MyActivityBase extends Activity{
	
	private ActivityApplication sharedApplication;
	
	protected Handler handler;
	
	protected void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		sharedApplication = (ActivityApplication)getApplication();
		handler = new Handler();
	}

	public ActivityApplication getSharedApplication() {
		return sharedApplication;
	}

	public void setSharedApplication(ActivityApplication sharedApplication) {
		this.sharedApplication = sharedApplication;
	}
	
	public void makeToast(String message){
		Toast.makeText(this, message, Toast.LENGTH_LONG).show();
	}
	
	public void changeActivity(Intent intent){
		startActivity(intent);
		finish();
	}
}
